'use strict';
module.exports = {
	/**
	 * 本页面的作用是：如果在前端获取到bd_vid，则访问此函数把触点信息存进数据库
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid, bd_vid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------

		let adds = await db.collection('jl_chudian').add({
			pt: "baidu",
			ip: originalParam.context.CLIENTIP,
			callback: bd_vid,
			time: new Date().getTime()
		})

		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
